export const downloadFile = (text:string, fileName:string, exp = 'txt') => {
    let element = document.createElement('a')
    element.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent(text))
    element.setAttribute('download', `${fileName}.${exp}`)
    element.style.display = 'none'
    element.click()
}

export const getImgUrl = file => {
return new URL(`../assets/images/${file}`, import.meta.url).href;
};